<?php
declare(strict_types=1);

namespace LowCode;

use LowCode\UI\Node;

class Html extends Node
{
    public static function div(mixed $children): static
    {
        return self::make("div")->children($children);
    }

    public static function span(mixed $children): static
    {
        return self::make("span")->children($children);
    }

    public static function p(mixed $children): static
    {
        return self::make("p")->children($children);
    }

    public static function h1(mixed $children): static
    {
        return self::make("h1")->children($children);
    }

    public static function h2(mixed $children): static
    {
        return self::make("h2")->children($children);
    }

    public static function h3(mixed $children): static
    {
        return self::make("h3")->children($children);
    }

    public static function h4(mixed $children): static
    {
        return self::make("h4")->children($children);
    }

    public static function h5(mixed $children): static
    {
        return self::make("h5")->children($children);
    }

    public static function h6(mixed $children): static
    {
        return self::make("h6")->children($children);
    }


    public static function img(string $src, array $props = []): static
    {
        return self::make("img", $props)->prop("src",$src);
    }
}
